package patterndesign.template;

/**
 * @Description
 * @Date 2021/9/15
 * @Created by Jonathan
 */
public class HummerH2Model extends HummerModel {


    @Override
    protected void start() {
        System.out.println("悍马汽车启动！");
    }

    @Override
    protected void stop() {
        System.out.println("悍马汽车停止！");

    }

    @Override
    protected void alarm() {
        System.out.println("悍马汽车鸣笛！");

    }

    @Override
    protected void engineBoom() {

    }

    /**
     * H2没有喇叭
     */
    public boolean isAlarm() {
        return false;
    }
}
